home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / g++1.68k / RCS / utils.mk,v < prev   
Encoding:
Text File  |  1991-05-24  |  2.7 KB  |  112 lines

  1. head     1.2;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @@;
  7.  
  8.  
  9. 1.2
  10. date     91.05.23.18.10.41;  author kupfer;  state Exp;
  11. branches ;
  12. next     1.1;
  13.  
  14. 1.1
  15. date     91.05.23.16.37.37;  author kupfer;  state Exp;
  16. branches ;
  17. next     ;
  18.  
  19.  
  20. desc
  21. @Makefile for utility programs that generate source for the compiler.
  22. @
  23.  
  24.  
  25. 1.2
  26. log
  27. @Delete a target before compiling it.  Also, remove .def files from
  28. .ALLSRC.
  29. @
  30. text
  31. @#
  32. # This Makefile is a special one for the cc1 program (the main portion of
  33. # the GNU C compiler).  The purpose of this Makefile is to generate
  34. # executable copies of several utility programs, which are then used
  35. # to generate source files for the compiler from a description of the
  36. # machine for which the compiler is to generate code.  This Makefile
  37. # must be separate from the main Makefile, and must be processed in
  38. # a separate invocation of Pmake, because its target machine must be
  39. # the machine on which we're executing now, not the machine on which
  40. # the compiler is to execute.
  41. #
  42. # $Header$
  43. #
  44.  
  45. MACHINES     = $(TM)
  46. SRCDIR        ?= ../cc/dist
  47. TM        ?= sun3
  48. CC        = cc
  49. LIBS        ?=
  50. XCFLAGS        ?=
  51.  
  52. .PATH.h        : ../cc/sprite $(SRCDIR) /sprite/lib/include \
  53.             /sprite/lib/include/$(TM).md
  54.  
  55. #include    <tm.mk>
  56. CFLAGS         = -g -O $(TMCFLAGS) -I. $(.INCLUDES) $(XCFLAGS)
  57.  
  58. all        : $(TM).md/genconfig $(TM).md/genflags $(TM).md/gencodes \
  59.             $(TM).md/genemit $(TM).md/genrecog \
  60.             $(TM).md/genextract $(TM).md/genpeep \
  61.             $(TM).md/genoutput
  62. #
  63. # The targets below are for a bunch of utility programs used to generate
  64. # C files for machine-dependent aspects of the compiler.  Things are a
  65. # little tricky here:  these programs have to be generated to run on
  66. # the current machine ($MACHINE).
  67. #
  68.  
  69. MAKEGEN:    .USE $(TM).md/rtl.o $(TM).md/obstack.o $(LIBS)
  70.     $(RM) -f $(.TARGET)
  71.     $(CC) $(CFLAGS) -o $(.TARGET) $(.ALLSRC:N*.h:N*.def)
  72.  
  73. $(TM).md/genconfig        : $(SRCDIR)/genconfig.c MAKEGEN
  74. $(TM).md/genflags        : $(SRCDIR)/genflags.c MAKEGEN
  75. $(TM).md/gencodes        : $(SRCDIR)/gencodes.c MAKEGEN
  76. $(TM).md/genemit        : $(SRCDIR)/genemit.c MAKEGEN
  77. $(TM).md/genrecog        : $(SRCDIR)/genrecog.c MAKEGEN
  78. $(TM).md/genextract        : $(SRCDIR)/genextract.c MAKEGEN
  79. $(TM).md/genpeep        : $(SRCDIR)/genpeep.c MAKEGEN
  80. $(TM).md/genoutput        : $(SRCDIR)/genoutput.c MAKEGEN
  81.  
  82. #
  83. # Targets to generate the .o files that must be linked with the files
  84. # above.
  85.  
  86. MAKEOBJ:    .USE
  87.     $(RM) -f $(.TARGET)
  88.     $(CC) $(CFLAGS) -c -o $(.TARGET) $(.ALLSRC:N*.h:N*.def)
  89.  
  90. $(TM).md/obstack.o        : obstack.c MAKEOBJ
  91. $(TM).md/rtl.o            : rtl.c MAKEOBJ
  92.  
  93. #if exists($(TM).md/dependencies.mk)
  94. #include    "$(TM).md/dependencies.mk"
  95. #endif
  96. @
  97.  
  98.  
  99. 1.1
  100. log
  101. @Initial revision
  102. @
  103. text
  104. @d12 2
  105. d40 2
  106. a41 1
  107.     $(CC) $(CFLAGS) -o $(.TARGET) $(.ALLSRC:N*.h)
  108. d57 2
  109. a58 1
  110.     $(CC) $(CFLAGS) -c -o $(.TARGET) $(.ALLSRC:N*.h)
  111. @
  112.